﻿using System.ComponentModel;
using TfsComLib.TfsBranchLib2;
using TfsComLib.TfsConnection;

namespace TfsBranchLib2.Model
{
    public class SourceControlBasePath : ISourceControlBasePath
    {
        private string basePath;


        private TfsConnectionData tfsConnection;

        public SourceControlBasePath()
        {
            TfsConnection = new TfsConnectionData();
        }

        public string BasePath
        {
            get { return basePath; }
            set
            {
                basePath = value;
                NotifyPropertyChanged("BasePath");
            }
        }

        public TfsConnectionData TfsConnection
        {
            get { return tfsConnection; }
            set
            {
                tfsConnection = value;
                NotifyPropertyChanged("TfsConnection");
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        private void NotifyPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
    }
}